package com.tl.juc.c1;

import java.util.TimerTask;
import java.util.concurrent.TimeUnit;

public class SleepThread {
    public static void main(String[] args) {
        Thread t1 = new Thread(() ->
        {
            try {
                // Thread.sleep(1000);
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("睡眠结束---");
        } );
        t1.start();
        // t1.interrupt();
    }
}
